<!DOCTYPE html>
{% extends 'lms/base.html' %}
{% load static %}

{% block title %}
    -借阅仪器历史
{% endblock %}

{% block css %}
    {% static 'lms/css/borrowHistory.css' %}
{% endblock %}
{% block main_block %}
    <div class="alert alert-warning alert-dismissible fade show" role="alert">
        {% if successInfo %}
            <div class="text-center welcomeSlogan"><strong>{{ successInfo }}</strong></div>
        {% elif failedInfo %}
            <div class="text-center welcomeSlogan"><strong>{{ failedInfo }}</strong></div>
        {% else %}
            <div class="text-center welcomeSlogan"><strong>欢迎查看借阅仪器历史</strong></div>
        {% endif %}
        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
    </div>

    <div class="col-md-12">
        <div id="table-responsive">
            <table class="table table-hover">
                <thead class="thead-light">
                <tr>
                    <th scope="col">序号</th>
                    <th scope="col">仪器</th>
                    <th scope="col">仪器借用个数</th>
                    <th scope="col">使用时间</th>
                </tr>
                </thead>

                <tbody class="no_underline">
                {% if InstrumentList %}
                    {% for instrument,borrowInfo,borrowTime in InstrumentList %}
                        <tr class="table">
                            <th class="text-dark" scope="row">{{ forloop.counter }}</th>
                            <td class="text-dark">{{ borrowInfo.instrument }}</td>
                            <td class="text-dark">{{ borrowInfo.ins_boNum }}</td>
                            <td class="text-dark">{{ borrowInfo.ins_boDate }}</td>
                        </tr>
                    {% endfor %}
                {% endif %}
                </tbody>
            </table>
        </div>
    </div>


{% endblock %}